package com.zj.log.repository;

import com.zj.log.domain.MsgUser;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Auther: zj
 * @Date: 2019/2/25 17:24
 * @Description:
 */
public interface MsgUserRepository extends JpaRepository<MsgUser,Integer>{

    List<MsgUser> findAllByUserId(Integer userId);

    List<MsgUser> findAllByUserIdAndState(Integer userId,Integer state);

    MsgUser findOneByMsgIdAndUserId(Integer msgId,Integer userId);

}
